--- interplay of type directed name resolution and overload resolution
--- cover cases where TDNR on @x.m@ is only possible after overload resolution
module tests.comp.TDNR where
import Java.Net(URI, URL)

 
x =  _.startsWith "/" $ _.getPath $ File.new "/tmp"


y =  _.toURL $ _.toURI $ File.new "/tmp"
    -- _.toURL <$> (File.new "/tmp" >>= readonly _.toURI)           -- before changing File to pure
    -- (File.new "/tmp" >>= readonly _.toURI >>= pure . _.toURL)    -- did typecheck before 3.25.49
                                                                    -- clearly showing left-right bias

main :: IO Bool
main = do 
    println x
    println . either Throwable.show _.toString $ y
    pure true